//
//  ReadModel.m
//  news
//
//  Created by imacbookair on 16/3/10.
//  Copyright © 2016年 imacbookair. All rights reserved.
//

#import "ReadModel.h"

@implementation ReadModel

#pragma mark - 归档 解归档
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
- (void) encodeWithCoder: (NSCoder *)aCoder
{
    [aCoder encodeObject:_title forKey:@"标题"];
    [aCoder encodeObject:_url forKey:@"网址"];
    
}

- (instancetype)initWithCoder: (NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        // 按照归档时的key取值
        self.title = [aDecoder decodeObjectForKey:@"标题"];
        self.url = [aDecoder decodeObjectForKey:@"网址"];
    }
    return self;
}
@end
